﻿namespace DataSchema.Settings {


    partial class SettingSchema
    {
        partial class MyCollectionDataTable
        {
        }

        public DataSchema.Settings.SettingSchema.MyCollectionRow[] GetSiteCollections(string name)
        {
            DataSchema.Settings.SettingSchema.MyCollectionRow[] rs =
                (DataSchema.Settings.SettingSchema.MyCollectionRow[])
                this.MyCollection.Select("SiteName = '"+CollectionSchema.PrepareString(name)+"'", "Name");
            return rs;
        }

        public bool ContainsSite(string site)
        {
            System.Data.DataRow[] rs = this.Sites.Select("Name = '"+CollectionSchema.PrepareString(site)+"'");
            if(rs != null && rs.Length > 0)
                return true;
            return false;
        }
    }
}
